<template>
  <div class="layout">
    <van-nav-bar :title="title" left-arrow @click-left="onClickLeft" />
    <div class="layout-content">
      <van-form>
        <van-cell-group inset>
          <van-field
            v-model="
              publicForm.businessOpportunityContentVO.portraitList![dataIndex]
            "
            label="指标"
            placeholder="请输入指标"
            :rules="[{ required: true, message: '请请输入指标' }]"
          />
          <van-field
            v-model="
              publicForm.businessOpportunityContentVO.portraitList![dataIndex]
            "
            label="目标范围"
            placeholder="目标范围"
            :rules="[{ required: true, message: '请输入目标范围' }]"
          />
        </van-cell-group>
        <div style="margin: 16px">
          <van-button round block type="default"> 重置 </van-button>
          <van-button round block type="primary" native-type="submit">
            确定
          </van-button>
        </div>
      </van-form>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useBusinessPub } from "@/stores/businessPub";
import { storeToRefs } from "pinia";
import { useRouter } from "vue-router";
const store = useBusinessPub();
const { publicForm } = storeToRefs(store);
interface Props {
  dataIndex: number;
}

defineProps<Props>();
const router = useRouter();
const title = computed(() => {
  return "添加并购画像";
});

const onClickLeft = () => {
  router.back();
};
</script>

<style lang="scss" scoped>
.layout {
  height: 100vh;
  background-color: var(--bob-background-color);
}
</style>

